/*  Reshape WECC and Texas bootstraps data to wide.

NOTES: All directories and paths should be set in the "Create_TableA5.do" file.

*/

clear all

*Load bootstrap data for WECC and reshape it to wide format
use `"${data_path}/WECCBootsFinal11232019"'
*gen total_damages = nox+so2+pm25+co2
drop nox so2 pm25 co2
replace iterb = subinstr(iterb,"--","b",.)
reshape wide total_damages, i(zip) j(iterb) string
save `"${data_intermediate}/WECCBootsFinal11232019_wide"', replace

clear all
*Load bootstrap data for Texas and reshape it to wide format
use `"${data_path}/TexasBootsFinal11232019"'
gen total_damages = nox+so2+pm25+co2
drop nox so2 pm25 co2
reshape wide total_damages, i(zip) j(iterb)
save `"${data_intermediate}/TexasBootsFinal11232019_wide.dta"', replace

